import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: 'HomeView'
  },
  {
    path: '/list',
    name: 'List',
    component: () =>
      import(/* webpackChunkName: ''ListView'' */ '../views/ListView.vue')
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () =>
      import(/* webpackChunkName: ''CartView'' */ '../views/CartView.vue')
  },
  {
    path: '/my',
    name: 'My',
    component: () =>
      import(/* webpackChunkName: ''MyView'' */ '../views/MyView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
